/*
* $Id: SettingsWin.h 2 2009-12-23 13:58:02Z volok-aleksej@yandex.ru $
*
* Copyright 2008 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _SETTINGS_WIN_H_
#define _SETTINGS_WIN_H_

#include "../CommonControl.h"
#include "../Wnd.h"

#define TREE_SETTINGS_ID	0x2001
#define CONTENT_SETTINGS_ID	0x2002
#define APPLY_BUTTON_ID		0x2003
#define CANCEL_BUTTON_ID	0x2004
#define DEFAULT_BUTTON_ID	0x2005

class CTreeSettings;
class CContentSettings;

class CSettingsWin : public CFrameWnd, public CWndImpl
{
	CTreeSettings* m_pTreeSettings;
	CContentSettings* m_pContentSettings;
	CCommonButton m_buttonApply;
	CCommonButton m_buttonCancel;
	CCommonButton m_buttonDefault;
protected:
	virtual void PostNcDestroy();
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnPaint();
	afx_msg void OnSelChange();
	afx_msg void OnCancel();
	afx_msg void OnClose();
	afx_msg void OnApply();
	afx_msg void OnDefault();
	afx_msg LRESULT OnTabStop(WPARAM wParam, LPARAM lParam);
public:
	CSettingsWin();
	virtual ~CSettingsWin();

	void ApplyButtonState();
	bool IsValidate();
};

#endif /*_SETTINGS_WIN_H_*/